$(document).ready(function(){

	$('.box-item').mouseenter(function(){
		$(this).find('div.box-item-inner').first().stop().delay(200).animate({
			top: "-162px",
		},600);
		$(this).find('p.number-player').first().hide();	
	});
	$('.box-item').mouseleave(function(){
		$(this).find('div.box-item-inner').first().stop().animate({
			top: "0px",
		},600);
		$(this).find('p.number-player').first().show();	
	});

	// slide click arrow-down
	$('.arrow-down').click(function(){
		var curr = $('.slide-nav-item li.active');
		var next = curr.next();
		$('#slide .list-item .item').hide();
		$('#slide .list-item .item[data-game='+ next.data('game') +']').show();
		$('.slide-nav-item').animate({
			top: "-=93",
		},500, function() {
			$(".slide-nav-item").append($(".slide-nav-item li").filter(":first-child"));
		}).animate({
			top: "+=93",
		},0, function(){
			curr.removeClass('active');
			next.addClass('active');
		});
	});

	$('.arrow-up').click(function(){
		var curr = $('.slide-nav-item li.active');
		var prev = curr.prev();
		$('#slide .list-item .item').hide();
		$('#slide .list-item .item[data-game='+ prev.data('game') +']').show();
		$('.slide-nav-item').prepend($(".slide-nav-item li").filter(":last-child")).animate({
			top: "-=93",
		},0, function(){
			$('.slide-nav-item').animate({
				top: "+=93",
			}, 500, function(){
				curr.removeClass('active');
				prev.addClass('active');
			});
		});
	});

});